import logging
import logging.handlers

class LogFactory:
    def get_default_logger(self,name):
        logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s', filemode='w')
        logger = logging.getLogger(name)
        handler = logging.handlers.RotatingFileHandler('logs/'+name+'.log', maxBytes=512*1024, backupCount=10)
        logger.addHandler(handler)
        logger.info('Loging ['+name+'] was started')
        return logger